package edu.neu.cs6515.xml;

import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * Class to represent XML Result objects in the following format:
 *
 * {@code
 * <results>
      <score orange=Nat red=Nat green=Nat yellow=Nat purple=Nat blue=Nat />
      <score orange=Nat red=Nat green=Nat yellow=Nat purple=Nat blue=Nat />
      <score orange=Nat red=Nat green=Nat yellow=Nat purple=Nat blue=Nat />
      ...
      [<fail />]
      [<Tile ...>]
      [<bad reason=FreeShapedString />]
   </results>
 * }
 */
@XmlRootElement
@XmlType(name = "", propOrder = {"score", "tile", "strategy", "failList", "bad" })
@NoArgsConstructor
@EqualsAndHashCode
public final class Results {

    @Getter @Setter
    private List<Score> score = new LinkedList<Score>();

    @Getter @Setter
    private List<Tile> tile = new LinkedList<Tile>();

    @Getter @Setter
    private List<Bad> bad = new LinkedList<Bad>();

    @Getter @Setter
    private List<Strategy> strategy = new LinkedList<Strategy>();
    
    private List<False> failList = new LinkedList<False>();
    
    @XmlElement(name = "false")
    public List<False> getFailList() {
        return failList;
    }

    public void setFailList(final List<False> failList) {
        this.failList = failList;
    }

}
